package org.smvcd1.controller1;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.servlet.ModelAndView;


@Controller
@RequestMapping("/test2")//这个括号里是类的路径
public class Test2Controller  {

    @RequestMapping("/index2")//括号里是访问的路径
 public ModelAndView index2(){

     return new ModelAndView("/test2");

 }

    @RequestMapping("/index3")//可以写多个方法
    public ModelAndView index3(){

        return new ModelAndView("/test3");

    }
}
